package com.gec.system.annotation;


import lombok.Getter;

import java.lang.annotation.*;

@Target({ ElementType.PARAMETER, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented

public @interface MyLog {

        /*** 模块 */public String title() default "";
        /*** 操作类型* * 此处的 BusinessType 是我自己定义的枚举类* BusinessType.OTHER 代表其他操作*/
         BusinessType businessType() default BusinessType.OTHER;

        /*** 方法名 */public String methodName() default "";

        @Getter
        enum BusinessType{
                OTHER(0,"OTHER"),
                INSERT(1,"INSERT"),
                UPDATE(2,"UPDATE"),
                DELETE(3,"DELETE"),
                ;

                Integer type ;

                String name;

                BusinessType(Integer type, String name) {
                        this.type = type;
                        this.name = name;
                }
        }


}
